package com.hengpeng.itfints.config;

import com.hengpeng.common.config.ConfigManager;

public class Configuration
{
	public static String getValue(String key)
	{
		return ConfigManager.getPropertiesConfig(PageConfigConstants.MS_CONFIG_PROPERTIES).getConfigByKey(key);
	}

	public static Long getLong(String key)
	{
		if(key==null){
			return null;
		}
		if(getValue(key)!=null)
		{
			return Long.valueOf(getValue(key));
		}else
		{
			return null;
		}
		
	}

	public static Integer getInteger(String key)
	{
		if(key==null){
			return null;
		}
		if(getValue(key)!=null)
		{
			return Integer.valueOf(getValue(key));
		}else
		{
			return null;
		}
	}

	public static Double getDouble(String key)
	{
		if(key==null){
			return null;
		}
		if(getValue(key)!=null)
		{
			return Double.valueOf(getValue(key));
		}else
		{
			return null;
		}
	}

	public static Float getFloat(String key)
	{
		if(key==null){
			return null;
		}
		if(getValue(key)!=null)
		{
			return Float.valueOf(getValue(key));
		}else
		{
			return null;
		}
	}
}
